#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>

int pande(int n)
{
	int j = 0;
	for (j = 2; j<= sqrt(n);j++)
	{
		if (n % j == 0)
			return 0;
	}
	return 1;
 }
int main()
{
	int i = 0;
	int a = 0;
	int count = 0;
	scanf("%d", &a);
	printf("2 ");
	for (i = 3;i <=a;i+= 2)
	{
		
		if (pande(i))
		{
			printf("%d ", i);
			count++;
		}
	}

	count++;
	printf("\ncount==%d ", count);

	return 0;
}